package com.bianmaba.dc.bean;

import com.bianmaba.commons.bean.result.OperationResult;
import lombok.Data;

@Data
public class CollectorResponse<T> extends OperationResult<T> {
    private TaskStatus taskStatus;


    public static CollectorResponse of(boolean success) {
        return new CollectorResponse(success);
    }

    public static CollectorResponse of(boolean success, String result) {
        return new CollectorResponse(success, result);
    }

    public static CollectorResponse of(boolean success, String result, Object data) {
        return new CollectorResponse(success, result, data);
    }


    public CollectorResponse(boolean success, String result, T data) {
        this.success = success;
        this.result = result;
        this.data = data;
    }

    public CollectorResponse() {
    }

    public CollectorResponse(boolean success) {
        super(success);
    }

    public CollectorResponse(boolean success, String result) {
        super(success, result);
    }

    public CollectorResponse setTaskStatus(TaskStatus status) {
        this.taskStatus = status;
        return this;
    }
}
